package com.sky.mapper.admin;

import com.github.pagehelper.Page;
import com.sky.dto.DishPageQueryDTO;
import com.sky.pojo.Dish;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description DishMapper
 * @Author liujiangyuan
 * @Date 2024-10-12-21:28
 */
@Mapper

public interface DishMapper {

    @Select("select count(id) from dish where category_id = #{categoryId}")
    Integer countByCategoryId(Long categoryId);



    void insert(Dish dishDTO);

    Page<DishVO> pageQuery(DishPageQueryDTO dishPageQueryDTO);

    void deleteByIds(List<Integer> ids);

    Integer selectCountByIdsAndStatus(@Param("ids") List<Integer> ids,@Param("status") Integer enable);
}
